import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
import One from "@/pages/One.vue";
import Three from "@/pages/Three.vue";
import Two from "@/pages/Two.vue";
import OneChild from "@/pages/OneChild.vue";

 const router = createRouter({
    history:createWebHistory(),
    routes:[
        {
            name:"One",
            path:"/one",
            component:One,
            children:[
                {
                    name:"OneChild",
                    path:"/one/child",
                    component:OneChild,
                }
            ]
        },
        {
            name:"Two",
            path:"/two",
            component:Two,
        },
        {
            name:'Three',
            path:'/three',
            component:Three,
        },
        {
            name:'Four',
            path:'/four',
            component:() => import('@/pages/Four.vue'),
        }
    ]
})

export default router;